home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / COMPILER / SATHER / !Sather / Library / System / config / time < prev   
Text File  |  1996-06-22  |  826b  |  43 lines

  1. #ifndef TIME_CONFIG
  2. #define TIME_CONFIG
  3.  
  4. #ifdef PP
  5. #undef PP
  6. #endif
  7.  
  8. #ifdef APP
  9. #undef APP
  10. #endif
  11.  
  12. #ifdef VPP
  13. #undef VPP
  14. #endif
  15.  
  16. #ifdef FPP
  17. #undef FPP
  18. #endif
  19.  
  20. #ifdef VSTD
  21. #undef VSTD
  22. #endif
  23.  
  24. #define PP    no_pre,no_post
  25. #define VPP    volatile,PP
  26. #define VSTD    var "@r $$;"
  27.  
  28. TIME_SECONDS:    VPP,VSTD,exec "$$=(FLTD)time(NULL);" "$$";
  29.  
  30. TIMES_NOW:    VPP,declare "#include <sys/times.h>" "#include <limits.h>",
  31.             var "struct tms $$;",
  32.             exec "$0->$.wall_time=times(&$$);"
  33.              "$0->$.sys_time=$$.tms_stime;"
  34.              "$0->$.user_time=$$.tms_utime;"
  35.              "$0->$.child_sys_time=$$.tms_cstime;"
  36.              "$0->$.child_user_time=$$.tms_cutime;";
  37. TIMES_CLK:    PP,VSTD,exec "$$=CLK_TCK;",declare "#include <limits.h>";
  38.  
  39. MEMORY_NOW:    PP,exec "$0->$.sbrk_size=(long)sbrk(0);"
  40.                 "$0->$.gc_size=(long)GC_get_heap_size();";
  41.  
  42. #endif 
  43.